//
//  DGGBridgePluginBase.m
//  DGGMiniProgramSDK
//
//  Created by 胡中楷 on 2020/3/28.
//

#import <WebKit/WebKit.h>
#import "DGGBridgePluginBase.h"
#import "NSObject+DGGBridge.h"
#import "WKWebView+DGGBridge.h"
#import "WKWebViewJavascriptBridge.h"

@implementation DGGBridgePluginBase

+ (instancetype)injectBridgeWithWeb:(WKWebView *)webView{
    DGGBridgePluginBase *basePlugin = [[[self class] alloc] init];
    webView.bridgePlugin = basePlugin;
    //注入基础交互JS
    [basePlugin injectBridgeWithWeb:webView];
    //添加基础处理方法
    [basePlugin injectBaseHandleMethod];
    return basePlugin;
}

- (void)injectBaseHandleMethod{
#if DEBUG
    NSLog(@"___请注册交互基础方法");
#endif
}

- (void)dealloc{
#if DEBUG
    NSLog(@"♦️释放♦️%@",NSStringFromClass([self class]));
#endif
}

@end
